Skip to content

Refactor: split SDK basic examples - #19

Closed
tom-sapletta-com wants to merge 44 commits into
mainfrom
refactor/sdk-example-flow-split
Closed

Refactor: split SDK basic examples#19
tom-sapletta-com wants to merge 44 commits into
mainfrom
refactor/sdk-example-flow-split

Conversation

@tom-sapletta-com

Copy link
Copy Markdown
Contributor

This PR continues the analysis-driven refactor work: splits sdk/python/examples/basic.py into smaller flow/validation/proposal/reality steps.

Changes included:

  • python: split monolithic example main into orchestration + helper functions
  • keep behavior: extraction → diagnose → proposal/render/apply → reality/diff comparison
  • optional workspace comparison preserved behind T2C_COMPARE_WORKSPACE flag

Refs: /home/tom/github/semcod/todo2code/project/analysis.toon.yaml

Statistics: 54 files changed, 15703 insertions, 13468 deletions

Summary:
- Dirs: src=31, project=20, .=3
- Exts: .ts=31, .yaml=7, .md=6, .mmd=3, .png=3, .html=1
- A/M/D: 21/33/0
- Added: project2.sh, src/communication/llm/implementation.ts, src/communication/llm/index.ts, src/core/schema/code-change.ts, src/core/schema/conclusions.ts, src/core/schema/constants.ts, src/core/schema/index.ts, src/core/schema/intent.ts ...
- Symbols: unknown, isNestedCheckout, planIds, oldIndex, expectedRemaining

Added files:
- project2.sh (+79/-0)
- src/communication/llm/implementation.ts (+514/-0)
- src/communication/llm/index.ts (+1/-0)
- src/core/schema/code-change.ts (+322/-0)
- src/core/schema/conclusions.ts (+210/-0)
- src/core/schema/constants.ts (+31/-0)
- src/core/schema/index.ts (+4/-0)
- src/core/schema/intent.ts (+276/-0)
- src/core/schema/utils.ts (+219/-0)
- src/core/types/code-change.ts (+221/-0)
- src/core/types/diagnostics.ts (+45/-0)
- src/core/types/index.ts (+4/-0)
- src/core/types/intent.ts (+258/-0)
- src/core/types/pipeline.ts (+173/-0)
- src/semantic/reranker/candidate.ts (+200/-0)
- src/semantic/reranker/index.ts (+8/-0)
- src/semantic/reranker/result.ts (+264/-0)
- src/semantic/reranker/types.ts (+106/-0)
- src/semantic/reranker/validation.ts (+111/-0)
- src/synthesis/code-change-plan/implementation.ts (+1310/-0)
- ... and 1 more

Modified files:
- README.md (+4/-6)
- TODO.md (+3/-3)
- project/README.md (+5/-5)
- project/analysis.toon.yaml (+174/-194)
- project/calls.mmd (+933/-867)
- project/calls.png (+0/-0)
- project/calls.toon.yaml (+359/-264)
- project/calls.yaml (+4513/-3702)
- project/compact_flow.mmd (+10/-5)
- project/compact_flow.png (+0/-0)
- project/context.md (+161/-156)
- project/evolution.toon.yaml (+30/-30)
- project/flow.mmd (+24/-24)
- project/flow.png (+0/-0)
- project/index.html (+2/-2)
- project/map.toon.yaml (+1955/-1715)
- project/mermaid.export (+1132/-1127)
- project/planfile-tickets.yaml (+964/-708)
- project/project.toon.yaml (+28/-28)
- project/prompt.txt (+4/-6)
- ... and 13 more

Implementation notes (heuristics):
- Type inferred from file paths + diff keywords + add/delete ratio
- Scope prefers 'goal' when goal/* is touched; otherwise based on top-level dirs
- For <=6 files: generate short per-file notes from added lines (defs/classes/click options/headings)
- A/M/D derived from git name-status; per-file +X/-X from git numstat
Split remaining high-complexity paths in CLI/integration scripts into explicit helpers.
@tom-sapletta-com

Copy link
Copy Markdown
Contributor Author

Zamykam jako zanieczyszczony wariant refaktoru (169 plików / 44 commity). Czystym, ograniczonym następcą jest #21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant